<template>
  <el-dialog
    id="bouncedBox"
    :title="title"
    :visible.sync="show"
    :width="width+'%'"
    class="closeIcon"
    :append-to-body="append"
    :fullscreen="fullscreen"
    @close="close"
  >
    <!-- <i class="el-icon-full-screen" @click="fullScreen" /> -->
    <slot />
  </el-dialog>
</template>
<script>

export default {
  props: {
    title: {
      type: String,
      default: ''
    },
    dialogShow: {
      type: Boolean,
      default: false
    },
    width: {
      type: Number,
      default: 80
    },
    append: {
      type: Boolean,
      default: false
    }

  },
  data() {
    return {
      show: false,
      fullscreen: false
    }
  },
  watch: {
    dialogShow: function(newQuestion, oldQuestion) {
      this.show = newQuestion
    }
  },
  methods: {
    fullScreen() {
      this.fullscreen = !this.fullscreen
    },
    close() {
      this.$emit('update:dialogShow', this.show)
    }
  }
}
</script>
<style lang="scss" >
#bouncedBox {
  .el-dialog__headerbtn {
//  top: 8px !important;
    right: 30px;
    top: 17px;
    width: 25px;
    height: 25px;
    background: url('../../assets/close.png') left no-repeat;
    background-size: cover;
  }
.el-dialog__headerbtn i {
 font-size: 30px;
 visibility: hidden;
}
.el-dialog {
    border-radius: 12px;
}
.el-dialog__header {
    background: #fff !important;
    border-radius: 10px 10px 0 0 !important;
    padding: 15px 20px 1px;
}
.el-dialog__title{
    color: #f84311;
    font-size: 20px;
    font-weight: bold;
    line-height: 36px;
    // font-family: MicrosoftYaHei-Bold;
}
.el-dialog__title::before{
  display: inline-block;
  width: 4px;
  height: 20px;
  margin-right: 15px;
  border-radius: 4px;
  background-color: #f84311;
  vertical-align: middle;
  content: '';
}
//修改关闭按钮的图标
// .el-dialog__close.el-icon-close{
//     &::before{
//       content: "\e78d";
//       font-size: 30px;
//       color: #aaa;
//       font-weight: lighter;
//     }
//   }
}
</style>
